extends Reference

signal complete

func splitDongHua(donghua):
	var player=null
	if donghua==null:
		emit_signal("complete")
		return
	if typeof(donghua)==TYPE_ARRAY:
		if donghua==[]:
			emit_signal("complete")
			return
		if donghua[0]==0:
			#顺序执行
			player=GDLab.DongHuaListPlayer.new()
			player.connect("complete",self,"onChildComplete",[],4)
			player.play(donghua)
		elif donghua[0]==1:
			#并行执行
			player=GDLab.DongHuaParaPlayer.new()
			player.connect("complete",self,"onChildComplete",[],4)
			player.play(donghua)
		elif donghua[0]==2:
			#不等待的执行
			player=GDLab.DongHuaNoWaitPlayer.new()
			player.connect("complete",self,"onChildComplete",[],4)
			player.play(donghua)
	else:
		player=GDLab.DongHuaSinglePlayer.new()
		player.connect("complete",self,"onChildComplete",[],4)
		player.play(donghua)
	return player

func onChildComplete():
	pass